﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
    <style>
        body{margin:0;padding:0;}
    </style>
    <script src="Content/scripts/extjs/adapter/ext/ext-base.js"></script>
    <script src="Content/scripts/extjs/ext-all.js"></script>
    <script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="Content/scripts/Common.js"></script>
    <script language="javascript" for="WebOffice1" event="NotifyCtrlReady">
        <!--
         WebOffice1_NotifyCtrlReady() //在装载完Weboffice(执行<object>...</object>)控件后自动执行WebOffice1_NotifyCtrlReady方法
        //-->
    </script>
    <script>
        var urlArg = new getArg();
        function WebOffice1_NotifyCtrlReady() {
            if (urlArg.docRealName == undefined) {
                return;
            }
            var filePath = "/NoticeFolder/";
            if (urlArg.FileClass != undefined) {
                if (urlArg.FileClass == 0) {
                    filePath = "/PersonalFolder/";
                } else if (urlArg.FileClass == 1) {
                    filePath = "/ShareFolder/";
                } else if (urlArg.FileClass == 2) {
                    filePath = "/NoticeFolder/";
                }
            }
            var docRealName = urlArg.docRealName;
            var docType = docRealName.substr(docRealName.lastIndexOf('.')+1, 3);
            var officeObj = document.all.WebOffice1;
            officeObj.LoadOriginalFile(filePath + docRealName, docType); //从服务器加载文档数据
            //隐藏2003 所有菜单
            officeObj.HideMenuArea('', '', '', '');
            officeObj.ProtectDoc(1, 2, "123456");
            officeObj.ShowToolBar(0);
        }
        $.ajax({ type: 'post', url: "/File.mvc/AccessLog", data: { fileId: urlArg.fileId} });
    </script>
</head>
<body>
<OBJECT id=WebOffice1 height='732px' width='100%' style='LEFT: 0px; TOP: 0px'  classid='clsid:E77E049B-23FC-4DB8-B756-60529A35FAD5' codebase=weboffice_v6.0.5.0.cab#V6,0,5,0>
    <param name='_ExtentX' value='6350'><param name='_ExtentY' value='6350'>
</OBJECT>
</body>
</html>